home *** CD-ROM | disk | FTP | other *** search
- unit DrBobWeb;
- interface
- uses
- DsgnIntf, DBTables, DBWeb;
-
- type
- TBQueryTableProducer = class(TQueryTableProducer)
- private
- FQueryHTML: ShortString;
- published
- property QueryHTML: ShortString read FQueryHTML write FQueryHTML;
- end {TBQueryTableProducer};
-
- type
- TQueryHTMLProperty = class(TStringProperty)
- public
- function GetAttributes: TPropertyAttributes; override;
- procedure Edit; override;
- end;
-
- procedure Register;
-
- implementation
- uses
- DrBobWiz, Classes, Controls, Forms;
-
- function TQueryHTMLProperty.GetAttributes: TPropertyAttributes;
- begin
- Result := [paDialog]
- end {GetAttributes};
-
- procedure TQueryHTMLProperty.Edit;
- begin
- with TFormWizard.Create(Application) do
- try
- with (GetComponent(0) AS TQueryTableProducer) do
- begin
- if Assigned(Query) then
- begin
- ComboBoxAliases.Text := (Query AS TQuery).DatabaseName;
- MemoSQL.Lines.Assign((Query AS TQuery).SQL);
- if Assigned((Query AS TQuery).Params) then
- TheQuery.Params.Assign((Query AS TQuery).Params)
- end
- end;
- if ShowModal = mrOK then
- begin
- SetValue(EditFileName.Text);
- Finish
- end
- finally
- Free
- end;
- Modified
- end {Edit};
-
- procedure Register;
- begin
- RegisterComponents('internet',[TBQueryTableProducer]);
- RegisterPropertyEditor(TypeInfo(ShortString), TBQueryTableProducer,
- 'QueryHTML', TQueryHTMLProperty)
- end;
- end.
-